package com.slj.mapper;

import com.slj.entity.Employees;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 26607
* @description 针对表【employees(员工基本信息表)】的数据库操作Mapper
* @createDate 2025-05-30 08:37:53
* @Entity com.slj.entity.Employees
*/
public interface EmployeesMapper {
    //查询所有员工人数
    int queryAllEmployees();

    //根据员工工号查询员工信息(包括该员工的社保信息)
    List<Employees> employeeWithInsuranceMap(String no);

    //根据员工姓名(模糊査询)/所属部门ID查询员工列表
    List<Employees> queryEmployeeByKeyWord(@Param("bol") Boolean bol,@Param("keWord") String keWord);

    //查询所有员工考勤的次数(按次数倒序排列)，只要返回员工工号、员工姓名、考勤的次数
    List<Employees> queryInsurance();

    //删除离职状态员工的考勤记录
    int deleteByEmployee();

    //根据员工工号查询员工信息(包括该员工的考勤记录)
    List<Employees> queryInsuranceByEmployee(String no);

    //新建员工
    int insertEmployee(@Param("employees") Employees employees);

    int deleteByPrimaryKey(Long id);

    int insert(Employees record);

    int insertSelective(Employees record);

    Employees selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Employees record);

    int updateByPrimaryKey(Employees record);

}
